package cn.itcast.function;

import java.util.function.Supplier;

public class SupplierTest {

    public static void main(String[] args) {

        //普通的lambda
        Supplier<String> supplier1 = () -> "nice";

        //特殊的lambda
        Supplier<String> supplier2 = String::new;


        String s1 = supplier1.get();

        String s2 = supplier2.get();

        //打印s1
        System.out.println(s1);

        //打印s2
        System.out.println(s2);
    }
}